Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[make init] update submodule's remotes #5534

Merged
merged 2 commits into from
Oct 9, 2020
Merged

Conversation

yxieca
Copy link
Contributor

@yxieca yxieca commented Oct 2, 2020

- Why I did it
I am using a long standing checked out repo to build dev images. From time to time the repo is too out-sync'ed with remotes and some submodule stay behind even after make reset and make init call. This causes build to fail unexpectedly.

- How I did it
With further tests, I moved the recursive "git remote update' to make reset code block and placed in front of recursive --init. The original change has the ordering wrong but that was hidden by the fact that make init was executed multiple times in master branch and 201911 branch.

The summary is:

  • for a newly cloned repo. existing 'make init' is enough.
  • for long standing repo, when things are getting too out dated, or when we switching branch, we usually need to do a make reset before build again. Place the fix in make reset makes more sense.

Signed-off-by: Ying Xie [email protected]

- How to verify it
Build a dev image. Tested it with a newly cloned repo as well.

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

This change is to address an issue where when using a long standing
repo to build image, the submodule could become out-dated with their
remotes so that make init is no longer to bring all submoudles to
the latest. The consequence is weird build failures.

Updatign all submodule's remotes addres the issue with the cost of
make init runs a bit longer.

Signed-off-by: Ying Xie <[email protected]>
@yxieca
Copy link
Contributor Author

yxieca commented Oct 3, 2020

retest broadcom please

@lguohan lguohan requested review from qiluo-msft and xumia October 4, 2020 06:01
Makefile.work Outdated Show resolved Hide resolved
qiluo-msft
qiluo-msft previously approved these changes Oct 8, 2020
Copy link
Collaborator

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please also check with other reviewers.

@yxieca yxieca merged commit f7ee983 into sonic-net:master Oct 9, 2020
@yxieca yxieca deleted the make branch October 9, 2020 15:53
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
* [make reset] update submodule's remotes

This change is to address an issue where when using a long standing repo to build image, the submodule could become out-dated with their remotes so that make init is no longer to bring all submoudles to the latest. The consequence is weird build failures.

When we update/switch branch in a long standing repo, we will issue 'make reset' to get repo ready for next build. Updating all submodule's remotes during "make reset" address the issue.

Signed-off-by: Ying Xie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants